#查找
str1="hello world and good and morning"
print(str1.find("and",15,30))
print(str1.find("and"))
print(str1.index("and"))
print(str1.count("and"))
print(str1.rfind("and"))
print(str1.rindex("and")
#代替
str1="hello world and good and morning"
str=str1.replace('and','he')
print(str)
#分割
str1="hello world and good and morning"
list1= str1.split('and',4)
print(list1)
#合并
list1=['hello world ', ' good ', ' morning']
str='....'.join(list1)
print(str)
#删除字符
str1="  hello world and good and morning    "
print(str1)
#str=str1.rstrip()
#str=str1.lstrip()
str=str1.strip()
print(str)
#字符串对齐
#字符串判断
#isalpha字母
#isalnum数字
#isdigit字母，数字
#isspace空格
str1="hello world"
print(str1.isalpha())
print(str1.isalnum())
print(str1.isspace())
print(str1.isdigit())

str2="     "
print(str2.isalpha())
print(str2.isalnum())
print(str2.isspace())
print(str2.isdigit())


str2="1234"
print(str2.isalpha())
print(str2.isalnum())
print(str2.isspace())
print(str2.isdigit())

str2="123abc"
print(str2.isalpha())
print(str2.isalnum())
print(str2.isspace())
print(str2.isdigit())